package main

import (
	"fmt"
	"github.com/go-resty/resty/v2"
	"io/ioutil"
	gconf2 "yundian/cmd/tools/grawl/gconf"
	"yundian/internel/pkg/dbs"
	"yundian/internel/pkg/dingo"
)

// 更新用户详情页面
func main()  {
	dingo.InitViper("./configs/adm.yaml")
	dbs.NewMysqlComponent().Step()
	url := "http://mng.cnman.cn/mng/10082/user/agent/info.html?id=100043"

	client := resty.New()
	resp, _ := client.R().
		SetHeader("Content-Type", "application/x-www-form-urlencoded").
		SetHeader("Cookie", gconf2.Cookie).
		Get(url)

	_ = ioutil.WriteFile(fmt.Sprintf("./data/users/info/20210317/1.html"), resp.Body(),666)
}
